import { ref } from 'vue';
/**
 *  钩子函数 实现设置并设置值
 * @param {*} val 
 */
export const useState = (val) => {
    const state = ref(val);
    const setState = newVal => (state.value = newVal);
    return [state, setState]
}
